
const appId = "wx0b3b59a59e417ba1"  
const secret = "c3bac5fdbb878b910dba43aedfa1923d"  
const jwt =require('jsonwebtoken')

function getToken(openid){
	return jwt.sign({openid:openid},secret,{expiresIn:60*60*24})
}
function verifyToken(token){
	return jwt.verify(token,secret)
}

module.exports = {
	appId,secret,
	getToken:getToken,
	verifyToken:verifyToken
}
